import json
from message import status_code


def response(code: int, response_str: str):
    return json.dumps({
        "statusCode": code,
        "msg": response_str
    })


def ok(response_str: str = "OK"):
    return response(status_code.OK, response_str)


def error(response_str: str = "Error"):
    return response(status_code.ERROR, response_str)
